package cn.edu.scau.cmi.huhaoxian.adapterPattern.adaptee;

import java.util.ArrayList;
import java.util.List;

import cn.edu.scau.cmi.huhaoxian.adapterPattern.pojo.Student;

public class StdApdatee {
	public ArrayList<Student> sortStduents(ArrayList<Student> students){
		for(int i=0;i<students.size();i++) {
			for(int j = 0;j<students.size()-i-1;j++) {
				if(students.get(j).number>students.get(j+1).number) {
					Student t = students.get(j);
					students.set(j, students.get(j+1));
					students.set(j+1, t);
				}
			}
		}
		return students;
	}
}